From 55c93e9e2e087cc9f5b982237e8be411a2cd5e99 Mon Sep 17 00:00:00 2001 From: Frederick Zhang Date: Thu, 27 Aug 2015 02:54:55 +0800 Subject: [PATCH] check and get dir by $PWD for Windows builds under Cygwin --- src/etc/cargo.bashcomp.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/etc/cargo.bashcomp.sh b/src/etc/cargo.bashcomp.sh index 21cea0cae..2d8a421a6 100644 --- a/src/etc/cargo.bashcomp.sh +++ b/src/etc/cargo.bashcomp.sh @@ -100,7 +100,12 @@ _get_examples(){ } _get_targets(){ - local CURRENT_PATH=$(_locate_manifest) + local CURRENT_PATH + if [ `uname -o` == "Cygwin" -a -f "$PWD"/Cargo.toml ]; then + CURRENT_PATH=$PWD + else + CURRENT_PATH=$(_locate_manifest) + fi if [[ -z "$CURRENT_PATH" ]]; then return 1 fi -- 2.30.2